package ibmetp.mis.dao;

import static org.junit.Assert.*;
import ibmetp.mis.vo.Bulletin;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class BulletinDaoTest {

	@Before
	public void setUp() throws Exception {
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void testGetBulletinByIdLong() {
		BulletinDao bl = new BulletinDao();
		Bulletin b = new Bulletin();
		b.setBulletinId(Long.valueOf(1));
		b.setPublishMsg("PUBLISH_MSG");
		b.setPrincipal("PR_ID");
//		fail("Not yet implemented");
	}

	@Test
	public void testUpdateBulletin() {
		
		BulletinDao bl = new BulletinDao();
		String bulletin = "4";
		Bulletin b = new Bulletin();
		b.setBulletinId(Long.valueOf(bulletin));
		b.setPublishMsg("公告内容");
		b.setPrincipal("负责人");
		bl.updateBulletin(b);
//		fail("Not yet implemented");
	}

	@Test
	public void testAddPublishMsg() {
		BulletinDao bl = new BulletinDao();
		Bulletin b = new Bulletin();
		b.setBulletinId(Long.valueOf(1));
		b.setPublishMsg("内容");
		b.setPrincipal("负责人");
		bl.addPublishMsg(b);
	}

	@Test
	public void testDeleteById() {
		String Bulletin = "1";
		BulletinDao rd = new BulletinDao();
		rd.deleteById(Long.valueOf(Bulletin));
//		fail("Not yet implemented");
	}

	@Test
	public void testGetBulletinPage() {
		BulletinDao bl = new BulletinDao();
		Bulletin b = new Bulletin();
		b.setBulletinId(Long.valueOf(1));
		b.setPublishMsg("内容");
		b.setPrincipal("负责人");
		int pageNo = 0;
		int pageSize = 0;
		bl.getBulletinPage(pageNo, pageSize,bl);
//		fail("Not yet implemented");
	}

}
